package com.hntest.controller;

import com.hntest.entity.Pager;
import com.hntest.entity.Rechargeoffline;
import com.hntest.service.RechargeofflineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller("RechargeofflineController")
public class RechargeofflineController {

    @Autowired
    private RechargeofflineService rechargeofflineService;

    public void setRechargeofflineService(RechargeofflineService rechargeofflineService) {
        this.rechargeofflineService = rechargeofflineService;
    }

        @RequestMapping(value = "p2p/rechargeOffline",method = {RequestMethod.GET,RequestMethod.POST})
        public String p2pselect(Pager pager, Rechargeoffline rechargeoffline, ModelMap modelMap, HttpServletRequest request){
/*            List<Rechargeoffline> list = rechargeofflineService.getListByPage(pager,rechargeoffline);
            modelMap.put("RechargeList",list);
            modelMap.put("pager",pager);*/
        return "p2p/rechargeOffline";
    }

    @RequestMapping(value = "/recharge",method = {RequestMethod.GET,RequestMethod.POST})
    public String select(Pager pager, Rechargeoffline rechargeoffline, ModelMap modelMap, HttpServletRequest request){
        /*List<Rechargeoffline> list = rechargeofflineService.getListByPage(pager,rechargeoffline);
        modelMap.put("list",list);
        modelMap.put("pager",pager);*/
        return "recharge";
    }

}
